<div align="center">
    
    
<!--SETING TOMBOL REGISTRASI DAN SEARCH PEGAWAI-->
    <table border="0" id="table">
        <tr>
            <th width="320">
                <div align="left">
                <?php 
                    echo img(base_url().'images/reguser.png');
                    echo anchor('Site/menu/Form_registrasi',' <b>Registrasi</b>'); 
                ?>
                </div>
            </th>
            <th width="500">
                <div align="right">
                <?php
                    echo form_open('Site/menu/Manajemen_user');
                    echo form_input('i_nama_pegawai')." ".form_submit('i_cari', 'Search');
                    echo form_close();
                ?>
                </div>
            </th>
        </tr>
    </table>
    

<!--DATA PEGAWAI YANG DILAKUKAN PAGINASI-->
    <table border="0" id="table">
            <tr id="yellow">
                <th id="th_2" width="170"><div align="center"><b>NIP</b></div></th>
                <th id="th" width="200"><div align="center"><b>NAMA</b></div></th>
                <th id="th" width="200"><div align="center"><b>PASSWORD</b></div></th>
                <th id="th" width="100"><div align="center"><b>HAKAKSES</b></div></th>
                <th id="th" width="80"><div align="center"><b>STATUS</b></div></th>
                <th id="th_3" width="50"><div align="center"><b>EDIT</b></div></th>
            </tr>
        <?php foreach($daftar_pegawai as $row){
         echo "<tr>";
            echo "<td id='td'>".$row->IDPEGAWAI."</td>";
            echo "<td id='td_1'>".$row->NAMAPEGAWAI."</td>";
            echo "<td id='td_1'>".$row->PASSWORD."</td>";
                $hak_akses;
                if($row->HAKAKSES == 1){
                    $hak_akses = "Tatausaha";
                }else if($row->HAKAKSES == 2){
                    $hak_akses = "Kepala Balai";
                }else{
                    $hak_akses = "Pegawai";
                }
            echo "<td id='td_1'>".$hak_akses."</td>";
                $status;
                if($row->STATUSPEGAWAI == 1){
                    $status = "Aktif";
                }else{
                    $status = "Non Aktif";
                }
            echo "<td id='td_1'>".$status."</td>";
            echo "<td id='td_2'><div align='center'>".anchor('Site/validasi_edit_pegawai/'.$row->IDPEGAWAI, img(base_url().'images/edit.png'))."</div></td>";
         echo "</tr>";
        } ?>
    </table>
    

<!--LINK PAGINASI-->
    <div align="center">
        <h6><?php echo $links; ?></h6>
    </div>
    

</div>